import request from '@/utils/request'

const baseApi = '/xmtsc-api'

// 企业注册
export function setRegister(data) {
    return request({
        url: '/api-user/users/registerCompany',
        method: 'post',
        data: data
    })
}

// 企业首页-魅力台商
export function getMLTS(data) {
    return request({
        url: baseApi + '/api/infomation/findAllList',
        method: 'get',
        params: data
    })
}

// 企业首页-入驻企业
export function getInEnterprise(data) {
    return request({
        url: baseApi + '/api/company/settledenterparise',
        method: 'get',
        params: data
    })
}

// 企业首页-岗位招聘
export function getJobInfo(data) {
    return request({
        url: baseApi + '/api/position/findPositions',
        method: 'get',
        params: data
    })
}

// 实习见习-职位列表
export function getInternship(data) {
    return request({
        url: baseApi + '/api/employmentPosition/findAllList',
        method: 'post',
        data: data
    })
}

// 实习见习-收藏职位
export function setCollect(data) {
    return request({
        url: baseApi + '/api/employmentPosition/addPositionCollection',
        method: 'post',
        data: data
    })
}

// 实习见习-批量收藏职位
export function setMoreCollect(data) {
    return request({
        url: baseApi + '/api/employmentPosition/addBatchPositionApplied',
        method: 'post',
        data: data
    })
}

// 实习见习-申请职位
export function applyJob(data) {
    return request({
        url: baseApi + '/api/employmentPosition/findRecommendedPositionList',
        method: 'post',
        data: data
    })
}

// 企业中心-账号安全-修改
export function changePw(data) {
    return request({
        url: baseApi + '/api/account/updateUserPassWord',
        method: 'post',
        data: data
    })
}

// 企业中心-账号安全-修改邮箱
export function updateEmail(data) {
    return request({
        url: baseApi + '/api/account/updateEmail',
        method: 'post',
        data: data
    })
}

export function updateUserName(data) {
    return request({
        url: baseApi + '/api/account/updateUserName',
        method: 'post',
        data: data
    })
}

export function updatePhone(data) {
    return request({
        url: baseApi + '/api/account/updatePhone',
        method: 'post',
        data: data
    })
}

// 账户-账户信息
export function getAccountById(data) {
    return request({
        url: baseApi + '/api/account/getAccountById',
        method: 'post',
        data: data
    })
}

//获取职位详情
export function getCompanyPositionDetail(data) {
    return request({
        url: baseApi + '/api/employmentPosition/getCompanyPositionDetail',
        method: 'post',
        data: data
    })
}

//获取企业详情
export function companyDetail(data) {
    return request({
        url: baseApi + '/api/company/detail',
        method: 'get',
        params: data
    })
}

//获取企业详情
export function getCompanyBasicsInfoById(data) {
    return request({
        url: baseApi + '/api/companyInfo/getCompanyBasicsInfoById',
        method: 'get',
        params: data
    })
}
//用户关注企业
export function addResumeAttentionHide(data) {
    return request({
        url: baseApi + '/api/resume/addResumeAttentionHide',
        method: 'post',
        data: data
    })
}
//用户取消关注企业
export function updateResumeAttentionHide(data) {
    return request({
        url: baseApi + '/api/resume/updateResumeAttentionHide',
        method: 'post',
        data: data
    })
}
//企业服务-保存
export function serviceApply(data) {
    return request({
        url: baseApi + '/api/companyserver/save',
        method: 'post',
        data: data
    })
}
//企业服务-查询
export function serviceApplySearch(serverNo) {
    return request({
        url: baseApi + '/api/companyserver/' + serverNo,
        method: 'get',
    })
}

